﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Kikooland.Core;

namespace Kikooland
{
    public class Entity : IDrawable, IUpdatable
    {
        public Texture2D Texture { get; set; }
        public Int32 LifePoints { get; set; }
        public Int32 MaxLifePoints { get; set; }
        public RectangleEx Position { get; set; }

        public Entity()
        {

        }

        public Rectangle LifeBarCoordonates
        {
            get
            {
                return new Rectangle(
                    Convert.ToInt32(this.Position.X - 20),
                    Convert.ToInt32(this.Position.Y),
                    10, this.Position.Height);
            }
        }

        public virtual void Update(GameTime gameTime, MouseState mouseState, KeyboardState keyboardState)
        {

        }

        public virtual void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(this.Texture, this.Position.ToRectangle(), Color.White);
        }
    }
}
